package model

// StockDeptModel 结构体
type StockDeptModel struct {
	Id          int        `gorm:"column:id;isNullable:NO;" json:"id,omitempty"`
	ParentId    int64      `gorm:"column:parent_id;comment:父ID 0最高级部门;default:0;isNullable:NO;" json:"parentId,omitempty"`
	DeptName    string     `gorm:"column:dept_name;comment:名称;isNullable:NO;size:150;" json:"deptName,omitempty"`
	DeptMark    string     `gorm:"column:dept_mark;comment:部门标识;isNullable:YES;size:150;" json:"deptMark,omitempty"`
	DeptStaff   string     `gorm:"column:dept_staff;comment:部门所属员工;isNullable:YES;size:150;" json:"deptStaff,omitempty"`
	DeptOrder   int        `gorm:"column:dept_order;comment:部门排序;isNullable:YES;" json:"deptOrder,omitempty"`
	Status      string     `gorm:"column:status;comment:状态 Y/N;default:Y;isNullable:YES;size:10;" json:"status,omitempty"`
	Type        int        `gorm:"column:type;comment:1部门 2部门员工关系;" json:"type,omitempty"`
	Remark      string     `gorm:"column:remark;comment:备注说明;isNullable:YES;size:255;" json:"remark,omitempty"`
	CreateBy    string     `gorm:"column:create_by;comment:创建者;isNullable:NO;size:150;" json:"createBy,omitempty"`
	CreateTime  *LocalTime `gorm:"column:create_time;default:CURRENT_TIMESTAMP;isNullable:NO;" json:"createTime"`
	LastUpdTime *LocalTime `gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;isNullable:NO;" json:"lastUpdTime"`
}

func NewStockDeptModel() *StockDeptModel {
	return &StockDeptModel{}
}

// TableName StockDept 表名
func (a *StockDeptModel) TableName() string {
	return "stock_dept"
}
